lambda function with map filter reduce